package com.catchu.pattern.creational.迭代器模式.c使用java的迭代器;

import com.catchu.pattern.creational.迭代器模式.c使用java的迭代器.aggregate.ListPayAggregate;

import java.util.Iterator;

public class Client {
    public static void main(String[] args) {
        ListPayAggregate aggregate = new ListPayAggregate();
        aggregate.calcPay();
        Iterator iterator = aggregate.createIterator();
        while (iterator.hasNext()){
            System.out.println(iterator.next().toString());
        }


    }
}
